package day12.homework2;

public class MotoVehicleFactory implements AbstractFactory {
    public static final String MOTO_VEHICLE_CAR = "car";
    public static final String MOTO_VEHICLE_TRUCK = "truck";
    public static final String MOTO_VEHICLE_BUS = "bus";
    public  MotoVehicle getMotoVehicle(String motoVehicle) {
        if(motoVehicle.equals(MOTO_VEHICLE_CAR)) return new Car();
        else if(motoVehicle.equals(MOTO_VEHICLE_TRUCK)) return new Truck();
        else if(motoVehicle.equals(MOTO_VEHICLE_BUS)) return new Bus();
        return null;
    }

}
